﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using System.Collections.ObjectModel;
using System.Management.Automation;
using System.Management.Automation.Runspaces;

namespace PowerSharp
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    {
        Pipelines ps = new Pipelines();
        public MainWindow()
        {
            InitializeComponent();
            scrollViewer1.Content = "Enter a command";
        }

        private void button1_Click(object sender, RoutedEventArgs e)
        {
            String txtBox = Convert.ToString(textBox1.Text);
            scrollViewer1.Content = ps.RunScript(txtBox);
        }

        private void button2_Click(object sender, RoutedEventArgs e)
        {
            scrollViewer1.Content = "Enter a command";
            textBox1.Text = "";
        }
    }
}
